<%@ page contentType="text/html;charset=UTF-8" %>
<style>
.main-sidebar, .left-side{top:50px;}
</style>
  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found   in sidebar.less -->
    <section class="sidebar">
      <!-- Sidebar user panel -->
      <div class="user-panel">
        <div class="pull-left image">
<%--          <img src="${version}/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">--%>
          
          <c:if test="${empty loginUser.user.userRemark}">
		        <img src="${ctx}/images/user/person2.png" class="img-circle"/>
		  </c:if>
		  <c:if test="${!empty loginUser.user.userRemark}">
		       <img src="${loginUser.user.userRemark}" class="img-circle"/>
		  </c:if>
          
        </div>
        <div class="pull-left info">
          <p>${loginUser.userCname}</p>
          <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
        </div>
      </div>
      <!-- search form -->
<%--      <form action="#" method="get" class="sidebar-form">--%>
<%--        <div class="input-group">--%>
<%--          <input type="text" name="q" class="form-control" placeholder="Search...">--%>
<%--              <span class="input-group-btn">--%>
<%--                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>--%>
<%--                </button>--%>
<%--              </span>--%>
<%--        </div>--%>
<%--      </form>--%>
      <!-- /.search form -->
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu">
        <li class="header"></li>
        
        <li class="treeview">
          <a href="#">
            <i class="fa fa-table"></i><span>平台管理</span>
            <i class="fa fa-angle-left pull-right"></i>
          </a>
          <ul class="treeview-menu">
          	<li id="objName-table"><a href="${page_admin}/sort/objName-table"><i class="fa fa-circle-o"></i>数据表管理</a></li>
<%--          	<li id="template-list"><a href="${page_admin}/sort/template-list-v1"><i class="fa fa-circle-o"></i>模板列表v1</a></li>--%>
          	<li id="trpTemplateManager-list"><a href="${page_admin}/rule/trpTemplateManager-list"><i class="fa fa-circle-o"></i>模板管理</a></li>
            <li id="plugin-list"><a href="${page_admin}/rule/plugin-list"><i class="fa fa-circle-o"></i>插件管理</a></li>
            <li id="rule-list"><a href="${page_admin}/rule/rule-list"><i class="fa fa-circle-o"></i>规则管理</a></li>
            <li id="params-list"><a href="${page_admin}/rule/params-list"><i class="fa fa-circle-o"></i>ius参数设置</a></li>
            <li id="template-edit"><a href="${page_admin}/rule/template-edit"><i class="fa fa-circle-o"></i>在线编辑</a></li>
          </ul>
        </li>
        
                
        <li class="treeview">
          <a href="#">
            <i class="fa fa-toggle-on"></i><span>系统规则管理</span>
            <i class="fa fa-angle-left pull-right"></i>
          </a>
          <ul class="treeview-menu">
            <li id="sysRulesType-list"><a href="${page_admin}/rule/sysRulesType-list"><i class="fa fa-circle-o"></i>规则类型管理</a></li>
            <li id="sysRulesTemplate-list"><a href="${page_admin}/sys/sysRulesTemplate-list"><i class="fa fa-circle-o"></i>系统规则定义</a></li>
          </ul>
        </li>
        
        
        <li class="treeview">
          <a href="#">
            <i class="fa fa-toggle-on"></i><span>品种管理</span>
            <i class="fa fa-angle-left pull-right"></i>
          </a>
          <ul class="treeview-menu">
            <li id="trpCate-list"><a href="${page_admin}/rule/trpCate-list"><i class="fa fa-circle-o"></i>品种定义</a></li>
          	<li id="trpConstant-list"><a href="${page_admin}/rule/trpConstant-list"><i class="fa fa-circle-o"></i>品种状态设置</a></li>
          	<li id="trpRulesParam-list"><a href="${page_admin}/rule/trpRulesParam-list"><i class="fa fa-circle-o"></i>品种规则管理</a></li>
          </ul>
        </li>
        
        <li class="treeview">
          <a href="#">
            <i class="fa fa-toggle-on"></i><span>发售-品种管理</span>
            <i class="fa fa-angle-left pull-right"></i>
          </a>
          <ul class="treeview-menu">
            <li id="sale-trpCate"><a href="${page_admin}/sale/sale-trpCate"><i class="fa fa-circle-o"></i>品种定义</a></li>
            <li id="sale-trpCate-trpTemplate"><a href="${page_admin}/sale/sale-trpCate-trpTemplate"><i class="fa fa-circle-o"></i>品种表单设置</a></li>
          </ul>
        </li>
        
        <li class="treeview">
          <a href="javascript:void(0);">
            <i class="fa fa-toggle-on"></i><span>发售-商品管理</span>
            <i class="fa fa-angle-left pull-right"></i>
          </a>
	         <!-- 
	          <ul class="treeview-menu" id="ul-cate-list">
	          </ul>
	           -->
           <ul class="treeview-menu">
           		<li id="bjtesale-reg-list"><a href="${page_admin}/sale/bjtesale-reg-list"><i class="fa fa-circle-o"></i>北京木材</a></li>
          </ul>
        </li>
       <!--  
        <li class="treeview">
          <a href="#">
            <i class="fa fa-toggle-on"></i><span>发售-前台模拟</span>
            <i class="fa fa-angle-left pull-right"></i>
          </a>
          <ul class="treeview-menu">
            <li id="my-sale"><a href="${page_web}/my-sale"><i class="fa fa-circle-o"></i>申购</a></li>
          </ul>
        </li>
        
         -->
        
        <li class="treeview">
          <a href="#">
            <i class="fa fa-th"></i> <span>机构与用户管理</span>     
             <i class="fa fa-angle-left pull-right"></i>       
          </a>
           <ul class="treeview-menu">
           		<li id="org-list"><a href="${page_admin}/org/org-list"><i class="fa fa-circle-o"></i>机构管理</a></li>
	            <li id="user-list"><a href="${page_admin}/user/user-list"><i class="fa fa-circle-o"></i>用户管理</a></li>
          </ul>
        </li>
        
        
         <li class="treeview">
          <a href="#">
            <i class="fa fa-user"></i> <span>权限管理</span>   
            <i class="fa fa-angle-left pull-right"></i>
                     
          </a>
           <ul class="treeview-menu">
            <li id="role-list"><a href="${page_admin}/acts/role-list"><i class="fa fa-circle-o"></i>角色管理</a></li>
            <li id="act-list"><a href="${page_admin}/acts/act-list"><i class="fa fa-circle-o"></i>资源管理</a></li>
          </ul>
        </li>
        
        <li class="treeview">
          <a href="#">
            <i class="fa fa-edge"></i> <span>网站管理</span>            
             <i class="fa fa-angle-left pull-right"></i>
          </a>
           <ul class="treeview-menu">
            <li id="channel_list"><a href="${page_admin}/website/channel-list"><i class="fa fa-circle-o"></i>栏目管理</a></li>
            <li id="manuscript_list"><a href="${page_admin}/website/manuscript-list"><i class="fa fa-circle-o"></i>稿件管理</a></li>
          </ul>
        </li>
        
        <li class="treeview">
          <a href="#">
            <i class="fa fa-leanpub"></i> <span>代码集管理</span>            
             <i class="fa fa-angle-left pull-right"></i>
          </a>
           <ul class="treeview-menu">
            <li id="dict-list"><a href="${page_admin}/dict/dict-list?sysEname=defult"><i class="fa fa-circle-o"></i>通用代码集</a></li>
            <li id="dict-list"><a href="${page_admin}/dict/dict-list"><i class="fa fa-circle-o"></i>系统代码集</a></li>
          </ul>
        </li>
        
        <li class="treeview">
          <a href="#">
            <i class="fa fa-cog"></i> <span>系统管理</span>
             <i class="fa fa-angle-left pull-right"></i>
          </a>
          
          <ul class="treeview-menu">
            <li id="protocol-list"><a href="${page_admin}/user/protocol-list"><i class="fa fa-circle-o"></i>接口注册</a></li>
<%--            <li><a href="#"><i class="fa fa-circle-o"></i>定时任务管理</a></li>--%>
<%--            <li><a href="#"><i class="fa fa-circle-o"></i>序列配置</a></li>--%>
<%--            <li><a href="#"><i class="fa fa-circle-o"></i>附件库管理</a></li>--%>
<%--            <li><a href="#"><i class="fa fa-circle-o"></i>动态表单</a></li>--%>
<%--            <li><a href="#"><i class="fa fa-circle-o"></i>会员类型</a></li>--%>
<%--            <li><a href="#"><i class="fa fa-circle-o"></i>审核规则设置</a></li>--%>
          </ul>
        </li>
        
        <li class="treeview">
          <a href="#">
            <i class="fa fa-cog"></i> <span>API-Demo</span>
             <i class="fa fa-angle-left pull-right"></i>
          </a>
          
          <ul class="treeview-menu">
            <li id="api-select-v1"><a href="${page_admin}/api/demo/select-v1"><i class="fa fa-circle-o"></i>数据字典</a></li>
          </ul>
        </li>
        
         
        <li class="treeview">
          <a href="#">
            <i class="fa fa-user"></i> <span>办公</span>   
            <i class="fa fa-angle-left pull-right"></i>
                     
          </a>
        <!-- 
          <ul class="treeview-menu">
            <li id="oaLoanBill-list--------"><a href="${page_admin}/oa/oaLoanBill-list"><i class="fa fa-circle-o"></i>借款单</a></li>
          </ul>
           <ul class="treeview-menu">
            <li id="oaLoanBillY-list"><a href="${page_admin}/oa/oaLoanBillY-list"><i class="fa fa-circle-o"></i>借款单-测试</a></li>
          </ul>
           -->
           <ul class="treeview-menu">
            <li id="oaLoanBill-list"><a href="${page_admin}/oa-1/oaLoanBill-list"><i class="fa fa-circle-o"></i>oa-借款单</a></li>
            <li id="bjtesale-list"><a href="${page_admin}/sale/bjtesale-list"><i class="fa fa-circle-o"></i>北京木材</a></li>
          </ul>
        </li> 
       
        
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>
  
  <script>

  
 function loadCateList(){
 		var lihtml = "";
 		$("#ul-cate-list").html("");
 		$.ajax({
 			   type:'get',
 			   url:common_list_url,
 			   async:false,
 			   data:{"doCode":"dymicSql","modelTypes":"s_trpCate"},
 			   dataType:'json',
 			   success: function(myData){
 			   	console.log(myData);
 			   	if(myData.total>0){
 			   		for(var i=0;i<myData.rows.length;i++){
 			   			var obj = myData.rows[i];
 			   			lihtml +="<li id='"+obj.cateNo+"-list'>";
 			   			lihtml +="<a href='${pageContext.request.contextPath}/sendPage/sale/admin/sale/"+obj.cateNo+"-reg-list'><i class='fa fa-circle-o'></i>"+obj.cateName+"</a>";
     			   		lihtml +="</li>";
 			   		}
 			   		$("#ul-cate-list").html(lihtml);
 			   	}
 			  }
 			});	
 }
 </script>

